package com.fly.springcloud.service.impl;

import com.fly.springcloud.dao.PaymentDao;
import com.fly.springcloud.entities.Payment;
import com.fly.springcloud.service.PaymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author fly
 * @date 2020-03-05 19:46
 */
@Service
public class PaymentServiceImpl implements PaymentService {

    @Resource
    private PaymentDao paymentDao;

    @Override
    public int create(Payment payment) {
        return paymentDao.insert(payment);
    }

    @Override
    public Payment getPaymentById(Long id) {
        return paymentDao.selectByPrimaryKey(id);
    }


}
